<template>
  <div id="app">
    <!-- 头部搜素区 -->
    <SearchHeader></SearchHeader>
    <!-- 内容区 -->
    <div class="wrap">
      <div class="container">
        <router-view/>
      </div>
    </div>
    <!-- 右侧导航 -->
    <right-nav></right-nav>
    <!-- 页脚 -->
    <main-footer></main-footer>
  </div>
</template>

<script>
import Vue from 'vue';
import Vant from 'vant';
import 'vant/lib/index.css';
import 'vant/lib/icon/local.css';
import '../../public/static/fonts/iconfont.css';
import './less/main.less';
import api from './request';
import SearchHeader from './components/SearchHeader.vue';
import RightNav from './components/RightNav.vue';
import MainFooter from './components/MainFooter.vue';

Vue.use(Vant);
Vue.prototype.$api = api;

export default {
  name: 'App',
  components: {
    SearchHeader,
    RightNav,
    MainFooter
  }
};

</script>

<style lang="less">
  @import './less/reset.less';
  @import './less/global.less';
  @media only screen and (min-width: 320px) {
    html {
      font-size: 62.5% !important;
    }
  }
  @media only screen and (min-width: 640px) {
    html {
      font-size: 125% !important;
    }
  }
  @media only screen and (min-width: 750px) {
    html {
      font-size: 150% !important;
    }
  }
  @media only screen and (min-width: 1242px) {
    html {
      font-size: 187.5% !important;
    }
  }
  html, body, #app {
    height: 100%;
    background-color: #f3f3f3;
  }
  body {
    font-size: 1.2rem;
    background-color: skyblue;
    #app {
      height: 100%;
      .wrap {
        margin-top: 4.5rem;
        padding: 1rem;
        box-shadow: 0 -2px 10px -1px #ccc;
      }
    }
    .router-link-active {
      background-color: #00a895;
      color: #fff !important;
    }
  }
</style>
